//
// File: fftn.cpp
//
// MATLAB Coder version            : 4.0
// C/C++ source code generated on  : 18-Dec-2020 16:50:24
//

// Include Files
#include "rt_nonfinite.h"
#include "sea_parameter_cal.h"
#include "fftn.h"
#include "fft.h"
#include "permute.h"
#include "fft1.h"

// Function Definitions

//
// Arguments    : const double x[4194304]
//                creal_T f[4194304]
// Return Type  : void
//
void fftn(const double x[4194304], creal_T f[4194304])
{
  static const double dv1[129] = { 1.0, 0.99969881869620425, 0.99879545620517241,
    0.99729045667869021, 0.99518472667219693, 0.99247953459871,
    0.989176509964781, 0.98527764238894122, 0.98078528040323043,
    0.97570213003852857, 0.970031253194544, 0.96377606579543984,
    0.95694033573220882, 0.94952818059303667, 0.94154406518302081,
    0.932992798834739, 0.92387953251128674, 0.91420975570353069,
    0.90398929312344334, 0.89322430119551532, 0.881921264348355,
    0.87008699110871146, 0.85772861000027212, 0.84485356524970712,
    0.83146961230254524, 0.81758481315158371, 0.80320753148064494,
    0.78834642762660634, 0.773010453362737, 0.75720884650648457,
    0.74095112535495922, 0.724247082951467, 0.70710678118654757,
    0.68954054473706683, 0.67155895484701833, 0.65317284295377676,
    0.63439328416364549, 0.61523159058062682, 0.59569930449243336,
    0.57580819141784534, 0.55557023301960218, 0.53499761988709715,
    0.51410274419322166, 0.49289819222978404, 0.47139673682599764,
    0.44961132965460654, 0.42755509343028208, 0.40524131400498986,
    0.38268343236508978, 0.35989503653498811, 0.33688985339222005,
    0.31368174039889152, 0.29028467725446233, 0.26671275747489837,
    0.24298017990326387, 0.2191012401568698, 0.19509032201612825,
    0.17096188876030122, 0.14673047445536175, 0.1224106751992162,
    0.0980171403295606, 0.073564563599667426, 0.049067674327418015,
    0.024541228522912288, 0.0, -0.024541228522912288, -0.049067674327418015,
    -0.073564563599667426, -0.0980171403295606, -0.1224106751992162,
    -0.14673047445536175, -0.17096188876030122, -0.19509032201612825,
    -0.2191012401568698, -0.24298017990326387, -0.26671275747489837,
    -0.29028467725446233, -0.31368174039889152, -0.33688985339222005,
    -0.35989503653498811, -0.38268343236508978, -0.40524131400498986,
    -0.42755509343028208, -0.44961132965460654, -0.47139673682599764,
    -0.49289819222978404, -0.51410274419322166, -0.53499761988709715,
    -0.55557023301960218, -0.57580819141784534, -0.59569930449243336,
    -0.61523159058062682, -0.63439328416364549, -0.65317284295377676,
    -0.67155895484701833, -0.68954054473706683, -0.70710678118654757,
    -0.724247082951467, -0.74095112535495922, -0.75720884650648457,
    -0.773010453362737, -0.78834642762660634, -0.80320753148064494,
    -0.81758481315158371, -0.83146961230254524, -0.84485356524970712,
    -0.85772861000027212, -0.87008699110871146, -0.881921264348355,
    -0.89322430119551532, -0.90398929312344334, -0.91420975570353069,
    -0.92387953251128674, -0.932992798834739, -0.94154406518302081,
    -0.94952818059303667, -0.95694033573220882, -0.96377606579543984,
    -0.970031253194544, -0.97570213003852857, -0.98078528040323043,
    -0.98527764238894122, -0.989176509964781, -0.99247953459871,
    -0.99518472667219693, -0.99729045667869021, -0.99879545620517241,
    -0.99969881869620425, -1.0 };

  static const double dv2[129] = { 0.0, -0.024541228522912288,
    -0.049067674327418015, -0.073564563599667426, -0.0980171403295606,
    -0.1224106751992162, -0.14673047445536175, -0.17096188876030122,
    -0.19509032201612825, -0.2191012401568698, -0.24298017990326387,
    -0.26671275747489837, -0.29028467725446233, -0.31368174039889152,
    -0.33688985339222005, -0.35989503653498811, -0.38268343236508978,
    -0.40524131400498986, -0.42755509343028208, -0.44961132965460654,
    -0.47139673682599764, -0.49289819222978404, -0.51410274419322166,
    -0.53499761988709715, -0.55557023301960218, -0.57580819141784534,
    -0.59569930449243336, -0.61523159058062682, -0.63439328416364549,
    -0.65317284295377676, -0.67155895484701833, -0.68954054473706683,
    -0.70710678118654757, -0.724247082951467, -0.74095112535495922,
    -0.75720884650648457, -0.773010453362737, -0.78834642762660634,
    -0.80320753148064494, -0.81758481315158371, -0.83146961230254524,
    -0.84485356524970712, -0.85772861000027212, -0.87008699110871146,
    -0.881921264348355, -0.89322430119551532, -0.90398929312344334,
    -0.91420975570353069, -0.92387953251128674, -0.932992798834739,
    -0.94154406518302081, -0.94952818059303667, -0.95694033573220882,
    -0.96377606579543984, -0.970031253194544, -0.97570213003852857,
    -0.98078528040323043, -0.98527764238894122, -0.989176509964781,
    -0.99247953459871, -0.99518472667219693, -0.99729045667869021,
    -0.99879545620517241, -0.99969881869620425, -1.0, -0.99969881869620425,
    -0.99879545620517241, -0.99729045667869021, -0.99518472667219693,
    -0.99247953459871, -0.989176509964781, -0.98527764238894122,
    -0.98078528040323043, -0.97570213003852857, -0.970031253194544,
    -0.96377606579543984, -0.95694033573220882, -0.94952818059303667,
    -0.94154406518302081, -0.932992798834739, -0.92387953251128674,
    -0.91420975570353069, -0.90398929312344334, -0.89322430119551532,
    -0.881921264348355, -0.87008699110871146, -0.85772861000027212,
    -0.84485356524970712, -0.83146961230254524, -0.81758481315158371,
    -0.80320753148064494, -0.78834642762660634, -0.773010453362737,
    -0.75720884650648457, -0.74095112535495922, -0.724247082951467,
    -0.70710678118654757, -0.68954054473706683, -0.67155895484701833,
    -0.65317284295377676, -0.63439328416364549, -0.61523159058062682,
    -0.59569930449243336, -0.57580819141784534, -0.55557023301960218,
    -0.53499761988709715, -0.51410274419322166, -0.49289819222978404,
    -0.47139673682599764, -0.44961132965460654, -0.42755509343028208,
    -0.40524131400498986, -0.38268343236508978, -0.35989503653498811,
    -0.33688985339222005, -0.31368174039889152, -0.29028467725446233,
    -0.26671275747489837, -0.24298017990326387, -0.2191012401568698,
    -0.19509032201612825, -0.17096188876030122, -0.14673047445536175,
    -0.1224106751992162, -0.0980171403295606, -0.073564563599667426,
    -0.049067674327418015, -0.024541228522912288, -0.0 };

  static creal_T dcv1[4194304];
  static creal_T dcv2[4194304];
  static creal_T dcv3[4194304];
  static creal_T dcv4[4194304];
  r2br_r2dit_trig(x, dv1, dv2, dcv1);
  permute(dcv1, dcv2);
  b_r2br_r2dit_trig(dcv2, dv1, dv2, dcv3);
  permute(dcv3, dcv4);
  fft(dcv4, f);
}

//
// File trailer for fftn.cpp
//
// [EOF]
//
